import request from "../request";

// 菜单管理页面接口模块
const menuApi = {
  // 获取菜单数据
  getMenuData(params) {
    return request({
      url: "/menuapi/getMenuData",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 新增菜单
  addMenu(params) {
    return request({
      url: "/menuapi/addMenu",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 修改菜单
  updateMenuData(params) {
    return request({
      url: "/menuapi/updateMenuData",
      method: "post",
      mock: false,
      data: params,
    });
  },
  //删除菜单
  deleteMenu(params) {
    return request({
      url: "menuapi/deleteMenu",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 批量删除菜单
  batchDelMenu(params) {
    return request({
      url: "/menuapi/batchDelMenu",
      method: "post",
      mock: false,
      data: params,
    });
  },
  // 更改菜单状态
  changeMenuStatus(params) {
    return request({
      url: "/menuapi/changeMenuStatus",
      method: "get",
      mock: false,
      data: params,
    });
  },

  getMenuTreeSelect(params) {
    return request({
      url: "/menuapi/getMenuTreeSelect",
      method: "get",
      mock: false,
      data: params,
    });
  },
};
export default menuApi;
